﻿using Api.Dal;
using Api.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Api.Bll
{
    public class AdminBll
    {
        public int count { get; set; }
        public Admin? GetAdmin(Admin ad)
        {
            Admin? admin = AdminDAL.GetAdmin(ad);
            //if (admin == null) return null;
            return admin;
        }
        public string InsertAdmin(Admin ad)
        {
            count++;
            return AdminDAL.insertAdmin(ad);
        }
        public bool UpdateAdmin(Admin ad)
        {
            return AdminDAL.UpdateAdmin(ad);
        }
        public bool DeleteAdmin(int uid)
        {
             return AdminDAL.DeleteAdmin(uid);
        }

        public User forbid(int id)
        {
            return AdminDAL.forbid(id);
        }
        public User disForbid(int id)
        {
            return AdminDAL.disForbid(id);
        }

    }
}
